<?php
	require_once ('start_session.php');
	if(isset($_GET['act'])) {
		switch($_GET['act']) {
		case "login":
			require_once("login.func.php");
			break;
		case "logout":
			require_once("logout.php");
			break;
		}	
	}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" />
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>Index</title>
  <link rel="stylesheet" type="text/css" href="./css/style.css" />
  <script src="js/jQuery 1.4.3.js"></script>
  <script src="js/jquery-ui-1.8.6.custom.min.js"></script>
  <script src="js/function.js"></script>
  <script src="./js/clock.js"></script>
  
</head>
<body>

<div id="wrapper">
<?php
	require_once ('db.php');
	
	$page_title = "<h1>Welcome</h1>";
	
	//Header and menu
	require_once 'header.php';
	
	//Main content
	echo "<div id='content'>";
		if(isset($_GET['act'])) {

			$page = $_GET['act'];
			switch ($page){
			case "login":
				require_once("login.php");
				break;
			case "register":
				require_once("register.php");
				break;
			case "memory":
				require_once("memory.php");
				break;
			case "playground":
				require_once("playground.php");
				break;
			case "Static":
				require_once("static.php");
				break;
			}
		} 
		else {
			require_once 'welcome.php';
		}
	echo "</div>";
	
	//Footer
	require_once 'footer.php'; 
?>
</div>
</body>
</html>